<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>"/>
<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>"/>
<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>"/>
<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>"/>

<input type="hidden" id="if_have_org" name="proposal/if_have_org">
<div class="t_bar"><span class="color_red">*</span>机构基本情况</div>
	<table class="t_css" width="100%" id="basic_info_jzfp" border="0" cellpadding="0"
	    cellspacing="1">
	<col style="width: 13%"/>
	<col style="width: 12%"/>
	<col style="width: 13%"/>
	<col style="width: 12%"/>
	<col style="width: 13%"/>
	<col style="width: 12%"/>
	<col style="width: 13%"/>
	<col style="width: 12%"/>
	    <tr class="li_1">
	        <td align="right" colspan="2">机构名称：</td>
	        <td colspan="2">
	        	<input type='text' name='proposal/zh_title' id='zh_title' style="width: 80%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/zh_title"/>' label="机构名称">
	        </td>
	        <td align="right" colspan="2">注册类型：</td>
	        <td colspan="2">	
		    <span name="organizations/organization[0]/nature_name">
		       <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_name" />
		    </span>
		    <input type="hidden" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />" label="${param.title }-->注册类型" name="organizations/organization[0]/nature_value"/>
			</td>
	    </tr>
	    
	    <tr >
	        <td align="right" colspan="2">归口管理部门：</td>
	        <td colspan="2">
	        	<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
				<cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}"  label="归口管理部门"
         			id="recomend_org"  showPattern="all" shieldPattern="0" topCheckbox="false" onClick="initTreeValueExt" />
				<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  class="required"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
				<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
	        </td>
	        <td align="right" colspan="2">申报日期：</td>
	        <td colspan="2">
	        	<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
	        	<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
			</td>
	    </tr>
	    <tr>
	    	<td align="right" colspan="2">中心类型：</td>
	    	<td colspan="6">
	    		<c:set var="center_type"><x:out select="$xmlData/data/proposal/center_type_value" /></c:set>
				<cpt:checkbox key="center_type" tagType="radio" name="center_type"  value="${center_type }" width="220px;" repeatColumn="3" onClick="initControlValue11(this.id);chack_rq();" style="border: 0px; padding: 0px; margin: 0px;float:left;" ></cpt:checkbox>
				<input type="hidden" id="center_type_value" name="proposal/center_type_value"  class="required"  value="<x:out select="$xmlData/data/proposal/center_type_value" />" label="中心类型">
				<input type="hidden" name="proposal/center_type_name" value="<x:out select="$xmlData/data/proposal/center_type_name" />">
			</td>
	    </tr>
	    <tr>
	        <td align="right" colspan="2">单位网址：</td>
	        <td colspan="2">
	        	<span name="organizations/organization[0]/http"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/http"/></span>
	        </td>
	        <td align="right" nowrap colspan="2">邮政编码：</td>
			<td colspan="2">
				<span name="organizations/organization[0]/zip_code"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/zip_code" /></span>
			</td>
	    </tr>
	    <tr>
	    	<td align="right" rowspan="3">联系人：</td>
	        <td align="right">姓名：</td>
	        <td colspan="2">
	        	<input  type="text" label="联系人姓名" 
	        	style="width: 80%"
	        	name="proposal/contact_psn_cname" class="input_css required" 
	        	maxlength="30" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
	    		</td>
	        <td align="right" colspan="2">职务：</td>
	        <td colspan="2">
	         <input type="text" label="联系人职务" name="proposal/contact_psn_job"
                class=" required " maxlength="20" style="width: 80%"
                value="<x:out select="$xmlData/data/proposal/contact_psn_job" />">
	        </td>
	    </tr>
	    
	    <tr >
	        <td align="right">电话：</td>
	        <td colspan="2">
	         <input type="text" label="联系人电话" name="proposal/contact_psn_tel"
                class=" required" maxlength="30" style="width: 80%"
                value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />">
            </td>
	        <td align="right" colspan="2">手机：</td>
	        <td colspan="2">
	        <input type="text" label="联系人手机" name="proposal/contact_psn_mobile" style="width: 80%"
	        class="input_css required mobile" maxlength="11" onfocus="InitInput.setNumber(this,11,0,0)"
	        value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />">
	    	</td>
	    </tr>
	    <tr>
	    	<td align="right">传真：</td>
	    	<td colspan="2">
	    		<input type="text" label="联系人传真" name="proposal/contacts_facsimile"
                class="required "  maxlength="20" style="width: 80%"
                value="<x:out select="$xmlData/data/proposal/contacts_facsimile" />">
	    	</td>
	    	<td align="right" colspan="2">电子邮件：</td>
	    	<td colspan="2">
	    		<input id="contact_psn_email"
	    		 name="proposal/contact_psn_email" label="联系人电子邮件"
	    		  required class="input_css required email"   style="width: 80%"
	    		  style="width:150px;" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />" /> 
			</td>
	    </tr>
	
	    <tr class="li_1">
	    	<td align="right" rowspan="2">人员情况：</td>
	        <td align="right">总数（人）：</td>
	        <td colspan="6">
	        	<span id="people_count_total" name="organization_persons/people_count_total">
					<x:out select="$xmlData/data/organization_persons/people_count_total"/>
			    </span>
			</td>
	    </tr>
	    
	    <tr >
	        <td align="right">本科（含以上）人数（人）：</td>
	        <td colspan="2">
	        	<input id="people_undergraduate" name="proposal/undergraduate_people" label="人员情况-->本科（含以上）人数" 
	        	onchange="countPeopleNum()" onfocus="InitInput.setNumber(this,9,0,0)" 
	        	type="text" required class="input_css required "  
	        	style="width:80%; text-align: right;" maxlength="50" 
	        	value="<x:out select="$xmlData/data/proposal/undergraduate_people" />"/>
			</td>
	        <td align="right" colspan="2">占总数比例（%）：</td>
	        <td colspan="2">
	        	<span id="undergraduate_people_num" name="proposal/undergraduate_people_num">
	        		<x:out select="$xmlData/data/proposal/undergraduate_people_num" />
	        	</span>
	        </td>
	    </tr>
	
	    <tr class="li_1">
	        <td align="right" colspan="2">近两年服务企业数（家）：</td>
	        <td colspan="2">
	        	<input type='text' name='proposal/service_enterprise_number' style="width: 80%;text-align:right;" 
	        	class="input_css required" maxlength="100"  onfocus="InitInput.setNumber(this,9,0,0)"
	        	value='<x:out select="$xmlData/data/proposal/service_enterprise_number" />' label="近两年服务企业数">
	        </td>
	        <td align="right" colspan="2">近两年服务企业次数（次）：</td>
	        <td colspan="2">
	        <input type='text' name='proposal/service_enterprise_count' style="width: 80%;text-align:right;" 
	        	class="input_css required" maxlength="100" onfocus="InitInput.setNumber(this,7,0,0)"
	        	value='<x:out select="$xmlData/data/proposal/service_enterprise_count" />' label="近两年服务企业次数">
	        </td>
	    </tr>
	    
	    <tr >
	        <td align="right" colspan="2">近两年为社会增加就业人数（人）：</td>
	        <td colspan="2">
	        <input type="text" style="text-align: right;width:80%;"
			name="proposal/performance" id="performance" class="input_css required"
			 value="<x:out select="$xmlData/data/proposal/performance" />"
			onfocus="InitInput.setNumber(this,7,0,0)" label="近两年为社会增加就业人数" />
	        	</td>
	        <td align="right" colspan="2">近两年联系科研院所及专家数量（个）：</td>
	    	<td colspan="2">
	    		<input id="people_expert" name="proposal/expert_people" label="近两年联系科研院所及专家数量" 
	    		onfocus="InitInput.setNumber(this,9,0,0)" type="text"  class="input_css required "  
	    		style="width:80%;text-align: right; text-align: right;"
	    		 maxlength="50" value="<x:out select="$xmlData/data/proposal/expert_people" />"/>
	    	</td>
	    </tr>
	  
	    <tr class="li_1">
	    	<td align="right" rowspan="3">近两年财务情况：</td>
	        <td align="right">总 收 入（万元）：</td>
	        <td colspan="2">
			<input name="proposal/budget1/all"  id="budgetAll"   type="text" 
			class="input_css required" style="text-align: right;width:80%;" label="近两年财务情况-->总收入"
			onfocus="InitInput.setNumber(this,9,4,2)" onchange="countAllInNum()"
			value="<x:out select="$xmlData/data/proposal/budget1/all" />" />
		</td>
		<td colspan="4"></td>
	    </tr>
	    
	    <tr >
	        <td align="right">科技服务收入（万元）：</td>
	        <td colspan="2">
	        <input name="proposal/budget1/service"  id="budgetService"   type="text" 
			class="input_css required" style="text-align: right;width:80%;" label="近两年财务情况-->科技服务收入"
			onfocus="InitInput.setNumber(this,9,4,2)" onchange="countAllInNum()"
			value="<x:out select="$xmlData/data/proposal/budget1/service" />" />	
	        </td>
	        <td align="right" colspan="2">利税总额（万元）：</td>
	    	<td colspan="2">
	    		 <input name="proposal/budget1/taxes"  id="budgetTaxes"   type="text" 
			class="input_css required" style="text-align: right;width:80%;" label="近两年财务情况-->利税总额"
			onfocus="InitInput.setNumber(this,9,4,2)"
			value="<x:out select="$xmlData/data/proposal/budget1/taxes" />" />	
	    	</td>
	    </tr>
	     <tr>
	        <td align="right" colspan="1">科技服务收入占总收入比：</td>
	        <td colspan="6">
	        	 <span id="servicePercent" name="proposal/budget1/servicepercent"  
	       style="text-align: left" label="科技服务收入占总收入比">
	       <x:out select="$xmlData/data/proposal/budget1/servicepercent" />	
	       </span>
			</td>
	    </tr>
	    <tr>
	        <td align="right" colspan="2">近两年经费投入与来源：</td>
	       	<td colspan="6">
	       	<c:set var="funds_input_source_typesa"><x:out select="$xmlData/data/proposal/funds_input_source/a" /></c:set>
	       	<c:set var="funds_input_source_typesb"><x:out select="$xmlData/data/proposal/funds_input_source/b" /></c:set>
	       	<c:set var="funds_input_source_typesc"><x:out select="$xmlData/data/proposal/funds_input_source/c" /></c:set>
	       	<c:set var="funds_input_source_typesd"><x:out select="$xmlData/data/proposal/funds_input_source/d" /></c:set>
	     	<table id="changeFundsInputTable"><tr><td>
			<input type="checkbox" value="a" onClick="changeFundsInput(this)"
			<c:if test="${not empty funds_input_source_typesa}">
			checked="checked"
			</c:if>/>国家财政
			<input type="text" maxlength="10" id="changeFundsInputa" 
			style="border-top: none;border-right:none;border-left:none;text-align:right;"
			onfocus="InitInput.setNumber(this,9,2,2)" label="近两年经费投入与来源-->国家财政"
			<c:if test="${not empty funds_input_source_typesa}">
			name="proposal/funds_input_source/a" value="${funds_input_source_typesa }"
			</c:if>
			<c:if test="${empty funds_input_source_typesa}">
			disabled="disabled"
			</c:if>
			/>万元
			</td><td>
			<input type="checkbox" value="b" onClick="changeFundsInput(this)"
			<c:if test="${not empty funds_input_source_typesb}">
			checked="checked"
			</c:if>
			/>地方财政
			<input type="text" maxlength="10" id="changeFundsInputb" 
			style="border-top: none;border-right:none;border-left:none;text-align:right;"
			onfocus="InitInput.setNumber(this,9,2,2)" label="近两年经费投入与来源-->地方财政"
			<c:if test="${not empty funds_input_source_typesb}">
			name="proposal/funds_input_source/b" value="${funds_input_source_typesb }"
			</c:if>
			<c:if test="${empty funds_input_source_typesb}">
			disabled="disabled"
			</c:if>
			/>万元
			</td></tr><tr><td>
			<input type="checkbox" value="c" onClick="changeFundsInput(this)"
			<c:if test="${not empty funds_input_source_typesc}">
			checked="checked"
			</c:if>
			/>单位自筹
			<input type="text" maxlength="10" id="changeFundsInputc" 
			style="border-top: none;border-right:none;border-left:none;text-align:right;"
			onfocus="InitInput.setNumber(this,9,2,2)" label="近两年经费投入与来源-->单位自筹"
			<c:if test="${not empty funds_input_source_typesc}">
			name="proposal/funds_input_source/c" value="${funds_input_source_typesc }"
			</c:if>
			<c:if test="${empty funds_input_source_typesc}">
			disabled="disabled"
			</c:if>
			/>万元
			</td><td>
			<input type="checkbox" value="d" onClick="changeFundsInput(this)"
			<c:if test="${not empty funds_input_source_typesd}">
			checked="checked"
			</c:if>
			/>其&nbsp;&nbsp;&nbsp;&nbsp;他
			<input type="text" maxlength="10" id="changeFundsInputd" 
			style="border-top: none;border-right:none;border-left:none;text-align:right;"
			onfocus="InitInput.setNumber(this,9,2,2)" label="近两年经费投入与来源-->其他"
			<c:if test="${not empty funds_input_source_typesd}">
			name="proposal/funds_input_source/d" value="${funds_input_source_typesd }"
			</c:if>
			<c:if test="${empty funds_input_source_typesd}">
			disabled="disabled"
			</c:if>
			/>万元
			</td></tr>
			</table>
			</td>
	    </tr>
	</table>
	
<script type="text/javascript">

function initTreeValueExt(treeId, treeNode) {
 	if ((treeNode && treeNode.isParent)) {
 		scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
 		$("#" + treeId).val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId	+ "_value']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
 		return false;
 	}
 	var str = treeNode.name;
 	var obj = treeNode.parentNode;
 	while (obj != null) {
 		str = obj.name + "-" + str;
 		obj = obj.parentNode;
 	}
 	
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
 }
 
	function changeCss(id) {
		$("#"+id+">tbody>tr:odd").each(function(){
			$(this).removeClass().addClass("li_1");
		});
		$("#"+id+">tbody>tr:even").each(function(){
			$(this).removeClass().addClass("li_2");
		});
	}
	
	
 
 function ContentDownDesc(template)
	{
		window.open('${res_app}/template/content/'+encodeURIComponent(template),'','resizable=yes,height=700,width=1000,scrollbars=yes,status=yes')
		return false;
	}
 function countPeopleNum(){
	var all = $("#people_count_total").text();
    var num = $("#people_undergraduate").val();
    if(num==""){
    	$("#undergraduate_people_num").text("");
    }else{
    	 $("#undergraduate_people_num").text(Math.round(parseInt(num) / parseInt(all) * 10000) / 100.00 + "%");
    }
 }
 
 function countAllInNum(){
		var all = $("#budgetAll").val();
	    var num = $("#budgetService").val();
	    if(num==""){
	    	$("#servicePercent").text("");
	    }else{
	    	 $("#servicePercent").text(Math.round(parseFloat(num) / parseFloat(all) * 10000) / 100.00 + "%");
	    }
	 }
 
 
 function changeFundsInput(obj){
	 var id = "changeFundsInput"+$(obj).val().toString();
	if($(obj).prop("checked")){
		$("#"+id).removeAttr("disabled");
		$("#"+id).attr("name","proposal/funds_input_source/"+$(obj).val().toString());
		$("#"+id).attr("class","required");
	}else{
		$("#"+id).attr("disabled","disabled");
		$("#"+id).val("");
		$("#"+id).removeAttr("name");
		$("#"+id).removeAttr("class","required");
	}
 }
 
</script>		
